<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <script th:src="@{/}+'js/tool.js'"></script>
    <style type="text/css">
        .layui-form .layui-form-item{
            width:90%;
        }
        .layui-input-inline{
            width:350px!important
        }
    </style>

</head>
<body style="margin-top: 100px">
<form class="layui-form" lay-filter="myform" id="myform">
    <div class="layui-form-item">
        <label class="layui-form-label">试卷名称</label>
        <div class="layui-input-inline">
            <input type="text" name="name" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">学院/系</label>
        <div class="layui-input-inline">
            <select name="collegeId" id="collegeId"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">考试科目</label>
        <div class="layui-input-inline">
            <select name="categoryId" id="categoryId"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">学年</label>
        <div class="layui-input-inline">
            <select name="gradeYear" id="gradeYear"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">学期</label>
        <div class="layui-input-inline">
            <select name="semester" id="semester"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">考试方式</label>
        <div class="layui-input-inline">
            <select name="testType" id="testType"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">考试时长</label>
        <div class="layui-input-inline">
            <input type="number" name="howlong" autocomplete="off" class="layui-input">
        </div><div class="layui-form-mid">分钟</div>
    </div>
</form>

<script>
    var id = $("#id").val();
    layui.link('layuiadmin/plugins/layui_complete-master/autocomplete.css');
    layui.extend({
        autocomplete: '{/}layuiadmin/plugins/layui_complete-master/autocomplete'
    });

    layui.use(['form', 'table', 'laydate','autocomplete'], function(){
        var form = layui.form;
        createSelect("semester","semester",form,1,'请选择');
        createSelect("test-type","testType",form,1,'请选择');
        select('libCategory/getPageList?limit=40&page=1' , 'categoryId',form,'name','id')
        select('gradeYear/getPageList?limit=40&page=1' , 'gradeYear',form,'name','id')
        select('college/getPageList?limit=40&page=1' , 'collegeId',form,'name','id')
    })
</script>
</body>
</html>

</body>
</html>